Attribute VB_Name = "modOtherCode"
Public Sub GetDBEntry(ByVal username As String, ByRef access As Integer, ByRef rank As String)
  Set userFSO = CreateObject("Scripting.FileSystemObject")
  
  If Not userFSO.FileExists(App.Path & "\" & "Users.txt") Then
    access = -1
    rank = vbNullString
    Exit Sub
  End If
  
  Set retrieveUser = userFSO.GetFile(App.Path & "\" & "Users.txt").OpenAsTextStream(1)
  getUsers = Split(retrieveUser.ReadAll, vbNewLine)
  retrieveUser.Close
  
  For i = 0 To UBound(getUsers)
    checkLen = UBound(Split(getUsers(i)))
  
    If checkLen = 2 Then
      getName = Split(getUsers(i))(0)
     
      If LCase(username) = LCase(getName) Then
        GetAccess = Split(getUsers(i))(1)
        getRank = Split(getUsers(i))(2)
        
        access = GetAccess
        rank = getRank
        Exit Sub
      End If
    ElseIf checkLen = 1 Then
      getName = Split(getUsers(i))(0)
      
      If LCase(username) = LCase(getName) Then
        getAccessRank = Split(getUsers(i))(1)
        
        If IsNumeric(getAccessRank) Then
          access = getAccessRank
          rank = vbNullString
        Else
          access = -1
          rank = getAccessRank
        End If
        
        Exit Sub
      End If
    End If
  Next i
End Sub

Public Sub PrintURLToFile(ByVal fFileName As String, ByVal fURL As String)
  Call URLDownloadToFile(0, fURL, fFileName, 0, 0)
End Sub

Public Sub handleWhisper(ByVal data As String)
  
  userList = data
  splitList = Split(userList, ", ")
    
  found = False
  For i = 0 To UBound(splitList)
    GetUser = splitList(i)
    GetUser = Replace(GetUser, "@", "")
    GetUser = Replace(GetUser, "%", "")
    
    If LCase(GetUser) = LCase(whisperTo) Then
      found = True
       sendPacket &HE, username & Chr$(0) & GetUser & Chr$(0) & whispMessage
      Exit Sub
    End If
  Next
    
  If found = False Then
    AddChat vbGray, "-- ", vbGray, "That user is not logged on!"
    frmStatus.txtMainWindowAddChat.Caption = frmStatus.txtMainWindowAddChat.Caption + 1
  End If

End Sub

Public Sub sendPacket(ByVal ID As Byte, ByVal data As String)
  'frmChat.sckVectorNet.SendData Chr$(ID) & data
  frmChat.sckVectorNet.SendData Chr$(ID) & Len(data) & Chr$(0) & data
End Sub
